package BookRack;

public class Main {
    public static void main(String[] args) {
        BookRack bookRack = new BookRack();

        // 初始化四本书的信息
        Book book1 = new Book("红楼梦", "曹雪芹", 50, "古典小说");
        Book book2 = new Book("三国演义", "罗贯中", 50, "古典小说");
        Book book3 = new Book("西游记", "吴承恩", 48, "古典小说");
        Book book4 = new Book("水浒传", "施耐庵", 42, "古典小说");

        // 将书籍放置到书架上
        bookRack.addBook(book1);
        bookRack.addBook(book2);
        bookRack.addBook(book3);
        bookRack.addBook(book4);

        // 输出存放书籍的数量
        System.out.println("书架上共有 " + bookRack.getNumberOfBooks() + " 本书。");
    }


}
